package com.cyf.plc.ui

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import com.cyf.library.util.UIUtils
import com.cyf.plc.BuildConfig
import com.cyf.plc.R
import kotlinx.android.synthetic.main.activity_setting.*

class SettingActivity : AppCompatActivity() {

    private var toolBar: Toolbar? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_setting)

        toolBar = findViewById<View>(R.id.toolbar) as Toolbar

        //设置NavigationIcon
        toolbar.setNavigationIcon(R.drawable.ic_arrow_back_black_24dp)

        toolbar.setTitle(R.string.app_name)

        //设置NavigationIcon点击响应
        toolbar.setNavigationOnClickListener {
            UIUtils.hideNavigation(this)
            onBackPressed()
        }
    }

}